package com.lanchetech.common.enums;

import lombok.Getter;

@Getter
public enum VoucherTypeEnum {
    FLASH_SALE((byte) 0, "秒杀"),
    BARGAIN((byte) 1, "砍价"),
    GIFT((byte) 2, "礼品"),
    ;

    private Byte type;
    private String remark;

    VoucherTypeEnum(Byte type, String remark) {
        this.type = type;
        this.remark = remark;
    }

    public static String getRemarkByType(Byte type) {
        for (VoucherTypeEnum item : VoucherTypeEnum.values()) {
            if (item.getType().equals(type)) {
                return item.getRemark();
            }
        }
        return "";
    }
}
